package com.ming.Controller;

import com.ming.Bean.User;
import com.ming.Service.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author:weiming
 * @Date:2020/11/24
 */
@RestController
@EnableAspectJAutoProxy(proxyTargetClass = true)
public class TransacationController {

    @Autowired
    UserServiceImpl userServiceImpl;

    @GetMapping("/tran")
    public void  tran() throws Exception {
        userServiceImpl.saveUser(new User("weiming","123456"));
    }


}
